Integrand size = 17, antiderivative size = 149 \[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=-\frac {\cos (c+d x)}{b^2 d}+\frac {a^2 d \cos \left (c-\frac {a d}{b}\right ) \operatorname {CosIntegral}\left (\frac {a d}{b}+d x\right )}{b^4}-\frac {2 a \operatorname {CosIntegral}\left (\frac {a d}{b}+d x\right ) \sin \left (c-\frac {a d}{b}\right )}{b^3}-\frac {a^2 \sin (c+d x)}{b^3 (a+b x)}-\frac {2 a \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{b^3}-\frac {a^2 d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (\frac {a d}{b}+d x\right )}{b^4} \]
a^2*d*Ci(a*d/b+d*x)*cos(-c+a*d/b)/b^4-cos(d*x+c)/b^2/d-2*a*cos(-c+a*d/b)*S i(a*d/b+d*x)/b^3+2*a*Ci(a*d/b+d*x)*sin(-c+a*d/b)/b^3+a^2*d*Si(a*d/b+d*x)*s in(-c+a*d/b)/b^4-a^2*sin(d*x+c)/b^3/(b*x+a)
Time = 0.53 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.79 \[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=\frac {a \operatorname {CosIntegral}\left (d \left (\frac {a}{b}+x\right )\right ) \left (a d \cos \left (c-\frac {a d}{b}\right )-2 b \sin \left (c-\frac {a d}{b}\right )\right )+b \left (-\frac {b \cos (c+d x)}{d}-\frac {a^2 \sin (c+d x)}{a+b x}\right )-a \left (2 b \cos \left (c-\frac {a d}{b}\right )+a d \sin \left (c-\frac {a d}{b}\right )\right ) \text {Si}\left (d \left (\frac {a}{b}+x\right )\right )}{b^4} \]
(a*CosIntegral[d*(a/b + x)]*(a*d*Cos[c - (a*d)/b] - 2*b*Sin[c - (a*d)/b]) + b*(-((b*Cos[c + d*x])/d) - (a^2*Sin[c + d*x])/(a + b*x)) - a*(2*b*Cos[c - (a*d)/b] + a*d*Sin[c - (a*d)/b])*SinIntegral[d*(a/b + x)])/b^4
Time = 0.57 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{b^2 (a+b x)^2}-\frac {2 a \sin (c+d x)}{b^2 (a+b x)}+\frac {\sin (c+d x)}{b^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 d \cos \left (c-\frac {a d}{b}\right ) \operatorname {CosIntegral}\left (x d+\frac {a d}{b}\right )}{b^4}-\frac {a^2 d \sin \left (c-\frac {a d}{b}\right ) \text {Si}\left (x d+\frac {a d}{b}\right )}{b^4}-\frac {a^2 \sin (c+d x)}{b^3 (a+b x)}-\frac {2 a \sin \left (c-\frac {a d}{b}\right ) \operatorname {CosIntegral}\left (x d+\frac {a d}{b}\right )}{b^3}-\frac {2 a \cos \left (c-\frac {a d}{b}\right ) \text {Si}\left (x d+\frac {a d}{b}\right )}{b^3}-\frac {\cos (c+d x)}{b^2 d}\) |
-(Cos[c + d*x]/(b^2*d)) + (a^2*d*Cos[c - (a*d)/b]*CosIntegral[(a*d)/b + d* x])/b^4 - (2*a*CosIntegral[(a*d)/b + d*x]*Sin[c - (a*d)/b])/b^3 - (a^2*Sin [c + d*x])/(b^3*(a + b*x)) - (2*a*Cos[c - (a*d)/b]*SinIntegral[(a*d)/b + d *x])/b^3 - (a^2*d*Sin[c - (a*d)/b]*SinIntegral[(a*d)/b + d*x])/b^4
3.1.28.3.1 Defintions of rubi rules used
Result contains complex when optimal does not.
Time = 0.31 (sec) , antiderivative size = 402, normalized size of antiderivative = 2.70
method | result | size |
risch | \(-\frac {i \left (2 i b^{3} d^{2} x^{2}+4 i a \,b^{2} d^{2} x +2 i a^{2} b \,d^{2}\right ) \cos \left (d x +c \right )}{2 b^{3} d^{2} \left (b x +a \right ) \left (-d x b -d a \right )}+\frac {\left (2 a^{2} b \,d^{3} x +2 d^{3} a^{3}\right ) \sin \left (d x +c \right )}{2 b^{3} d^{2} \left (b x +a \right ) \left (-d x b -d a \right )}-\frac {i \cos \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (-\frac {i d \left (b x +a \right )}{b}\right ) a}{b^{3}}+\frac {i \cos \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (\frac {i d \left (b x +a \right )}{b}\right ) a}{b^{3}}-\frac {d \cos \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (-\frac {i d \left (b x +a \right )}{b}\right ) a^{2}}{2 b^{4}}-\frac {d \cos \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (\frac {i d \left (b x +a \right )}{b}\right ) a^{2}}{2 b^{4}}-\frac {\sin \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (-\frac {i d \left (b x +a \right )}{b}\right ) a}{b^{3}}-\frac {\sin \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (\frac {i d \left (b x +a \right )}{b}\right ) a}{b^{3}}+\frac {i d \sin \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (-\frac {i d \left (b x +a \right )}{b}\right ) a^{2}}{2 b^{4}}-\frac {i d \sin \left (\frac {d a -c b}{b}\right ) \operatorname {Ei}_{1}\left (\frac {i d \left (b x +a \right )}{b}\right ) a^{2}}{2 b^{4}}\) | \(402\) |
derivativedivides | \(\frac {c^{2} d^{2} \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )-\frac {2 c \,d^{2} \left (\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{b}+\frac {2 d^{2} \left (d a -c b \right ) c \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{b}-\frac {2 \left (d a -c b \right ) d^{2} \left (\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{b^{2}}+\frac {\left (d^{2} a^{2}-2 a b c d +b^{2} c^{2}\right ) d^{2} \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{b^{2}}-\frac {d^{2} \cos \left (d x +c \right )}{b^{2}}}{d^{3}}\) | \(553\) |
default | \(\frac {c^{2} d^{2} \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )-\frac {2 c \,d^{2} \left (\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{b}+\frac {2 d^{2} \left (d a -c b \right ) c \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{b}-\frac {2 \left (d a -c b \right ) d^{2} \left (\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}-\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}\right )}{b^{2}}+\frac {\left (d^{2} a^{2}-2 a b c d +b^{2} c^{2}\right ) d^{2} \left (-\frac {\sin \left (d x +c \right )}{\left (d a -c b +b \left (d x +c \right )\right ) b}+\frac {\frac {\operatorname {Si}\left (d x +c +\frac {d a -c b}{b}\right ) \sin \left (\frac {d a -c b}{b}\right )}{b}+\frac {\operatorname {Ci}\left (d x +c +\frac {d a -c b}{b}\right ) \cos \left (\frac {d a -c b}{b}\right )}{b}}{b}\right )}{b^{2}}-\frac {d^{2} \cos \left (d x +c \right )}{b^{2}}}{d^{3}}\) | \(553\) |
-1/2*I/b^3/d^2*(2*I*a^2*b*d^2+4*I*a*b^2*d^2*x+2*I*b^3*d^2*x^2)/(b*x+a)/(-b *d*x-a*d)*cos(d*x+c)+1/2/b^3/d^2*(2*a^2*b*d^3*x+2*a^3*d^3)/(b*x+a)/(-b*d*x -a*d)*sin(d*x+c)-I/b^3*cos((a*d-b*c)/b)*Ei(1,-I*d*(b*x+a)/b)*a+I/b^3*cos(( a*d-b*c)/b)*Ei(1,I*d*(b*x+a)/b)*a-1/2*d/b^4*cos((a*d-b*c)/b)*Ei(1,-I*d*(b* x+a)/b)*a^2-1/2*d/b^4*cos((a*d-b*c)/b)*Ei(1,I*d*(b*x+a)/b)*a^2-1/b^3*sin(( a*d-b*c)/b)*Ei(1,-I*d*(b*x+a)/b)*a-1/b^3*sin((a*d-b*c)/b)*Ei(1,I*d*(b*x+a) /b)*a+1/2*I*d/b^4*sin((a*d-b*c)/b)*Ei(1,-I*d*(b*x+a)/b)*a^2-1/2*I*d/b^4*si n((a*d-b*c)/b)*Ei(1,I*d*(b*x+a)/b)*a^2
Time = 0.29 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.36 \[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=-\frac {a^{2} b d \sin \left (d x + c\right ) + {\left (b^{3} x + a b^{2}\right )} \cos \left (d x + c\right ) - {\left ({\left (a^{2} b d^{2} x + a^{3} d^{2}\right )} \operatorname {Ci}\left (\frac {b d x + a d}{b}\right ) - 2 \, {\left (a b^{2} d x + a^{2} b d\right )} \operatorname {Si}\left (\frac {b d x + a d}{b}\right )\right )} \cos \left (-\frac {b c - a d}{b}\right ) - {\left (2 \, {\left (a b^{2} d x + a^{2} b d\right )} \operatorname {Ci}\left (\frac {b d x + a d}{b}\right ) + {\left (a^{2} b d^{2} x + a^{3} d^{2}\right )} \operatorname {Si}\left (\frac {b d x + a d}{b}\right )\right )} \sin \left (-\frac {b c - a d}{b}\right )}{b^{5} d x + a b^{4} d} \]
-(a^2*b*d*sin(d*x + c) + (b^3*x + a*b^2)*cos(d*x + c) - ((a^2*b*d^2*x + a^ 3*d^2)*cos_integral((b*d*x + a*d)/b) - 2*(a*b^2*d*x + a^2*b*d)*sin_integra l((b*d*x + a*d)/b))*cos(-(b*c - a*d)/b) - (2*(a*b^2*d*x + a^2*b*d)*cos_int egral((b*d*x + a*d)/b) + (a^2*b*d^2*x + a^3*d^2)*sin_integral((b*d*x + a*d )/b))*sin(-(b*c - a*d)/b))/(b^5*d*x + a*b^4*d)
\[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=\int \frac {x^{2} \sin {\left (c + d x \right )}}{\left (a + b x\right )^{2}}\, dx \]
\[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=\int { \frac {x^{2} \sin \left (d x + c\right )}{{\left (b x + a\right )}^{2}} \,d x } \]
-1/2*((cos(c)^2 + sin(c)^2)*x^2*cos(d*x + c) + (x^2*cos(d*x + c)^2*cos(c) + x^2*cos(c)*sin(d*x + c)^2)*cos(d*x + 2*c) - 2*(((a*b^2*cos(c)^2 + a*b^2* sin(c)^2)*d*x^2 + 2*(a^2*b*cos(c)^2 + a^2*b*sin(c)^2)*d*x + (a^3*cos(c)^2 + a^3*sin(c)^2)*d)*cos(d*x + c)^2 + ((a*b^2*cos(c)^2 + a*b^2*sin(c)^2)*d*x ^2 + 2*(a^2*b*cos(c)^2 + a^2*b*sin(c)^2)*d*x + (a^3*cos(c)^2 + a^3*sin(c)^ 2)*d)*sin(d*x + c)^2)*integrate(x*cos(d*x + c)/(b^3*d*x^3 + 3*a*b^2*d*x^2 + 3*a^2*b*d*x + a^3*d), x) - 2*(((a*b^2*cos(c)^2 + a*b^2*sin(c)^2)*d*x^2 + 2*(a^2*b*cos(c)^2 + a^2*b*sin(c)^2)*d*x + (a^3*cos(c)^2 + a^3*sin(c)^2)*d )*cos(d*x + c)^2 + ((a*b^2*cos(c)^2 + a*b^2*sin(c)^2)*d*x^2 + 2*(a^2*b*cos (c)^2 + a^2*b*sin(c)^2)*d*x + (a^3*cos(c)^2 + a^3*sin(c)^2)*d)*sin(d*x + c )^2)*integrate(x*cos(d*x + c)/((b^3*d*x^3 + 3*a*b^2*d*x^2 + 3*a^2*b*d*x + a^3*d)*cos(d*x + c)^2 + (b^3*d*x^3 + 3*a*b^2*d*x^2 + 3*a^2*b*d*x + a^3*d)* sin(d*x + c)^2), x) + (x^2*cos(d*x + c)^2*sin(c) + x^2*sin(d*x + c)^2*sin( c))*sin(d*x + 2*c))/(((b^2*cos(c)^2 + b^2*sin(c)^2)*d*x^2 + 2*(a*b*cos(c)^ 2 + a*b*sin(c)^2)*d*x + (a^2*cos(c)^2 + a^2*sin(c)^2)*d)*cos(d*x + c)^2 + ((b^2*cos(c)^2 + b^2*sin(c)^2)*d*x^2 + 2*(a*b*cos(c)^2 + a*b*sin(c)^2)*d*x + (a^2*cos(c)^2 + a^2*sin(c)^2)*d)*sin(d*x + c)^2)
Leaf count of result is larger than twice the leaf count of optimal. 1120 vs. \(2 (152) = 304\).
Time = 0.33 (sec) , antiderivative size = 1120, normalized size of antiderivative = 7.52 \[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=\text {Too large to display} \]
((b*x + a)*a^2*(b*c/(b*x + a) - a*d/(b*x + a) + d)*d^2*cos(-(b*c - a*d)/b) *cos_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/ b) - a^2*b*c*d^2*cos(-(b*c - a*d)/b)*cos_integral(((b*x + a)*(b*c/(b*x + a ) - a*d/(b*x + a) + d) - b*c + a*d)/b) + a^3*d^3*cos(-(b*c - a*d)/b)*cos_i ntegral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) + ( b*x + a)*a^2*(b*c/(b*x + a) - a*d/(b*x + a) + d)*d^2*sin(-(b*c - a*d)/b)*s in_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) - a^2*b*c*d^2*sin(-(b*c - a*d)/b)*sin_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) + a^3*d^3*sin(-(b*c - a*d)/b)*sin_int egral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) + 2*( b*x + a)*a*b*(b*c/(b*x + a) - a*d/(b*x + a) + d)*d*cos_integral(((b*x + a) *(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b)*sin(-(b*c - a*d)/b) - 2*a*b^2*c*d*cos_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b)*sin(-(b*c - a*d)/b) + 2*a^2*b*d^2*cos_integral(((b*x + a)*( b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b)*sin(-(b*c - a*d)/b) - 2 *(b*x + a)*a*b*(b*c/(b*x + a) - a*d/(b*x + a) + d)*d*cos(-(b*c - a*d)/b)*s in_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) + 2*a*b^2*c*d*cos(-(b*c - a*d)/b)*sin_integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b) - 2*a^2*b*d^2*cos(-(b*c - a*d)/b)*sin _integral(((b*x + a)*(b*c/(b*x + a) - a*d/(b*x + a) + d) - b*c + a*d)/b...
Timed out. \[ \int \frac {x^2 \sin (c+d x)}{(a+b x)^2} \, dx=\int \frac {x^2\,\sin \left (c+d\,x\right )}{{\left (a+b\,x\right )}^2} \,d x \]